<?php

/*
$client = new SoapClient("http://79.123.252.91/OzlukSecureWS/PersonelValidation.asmx?WSDL",
array('Username'   => "wsuser-02",'Password'       => "46k54a92f1"));



$headerbody = array("wsa:Action" => "http://ozluk.netiket.com.tr/getPersonelInfoSummary", 
                    "wsse:Username" => "wsuser-02", 
                    "wsse:Password"=> "46k54a92f1", 
                     ); 
                     
$header = new SoapHeader( $headerbody );
$client->__setSoapHeaders($header);


$tc=$client->isExist(array("identityNo"=>"42361169248",));
echo $tc->isExistResult;

*/




/*

require_once('lib/nusoap.php');
require_once('lib/class.wsdlcache.php');
$proxyhost = isset($_POST['proxyhost']) ? $_POST['proxyhost'] : '';
$proxyport = isset($_POST['proxyport']) ? $_POST['proxyport'] : '';
$proxyusername = isset($_POST['proxyusername']) ? $_POST['proxyusername'] : '';
$proxypassword = isset($_POST['proxypassword']) ? $_POST['proxypassword'] : '';

$username = 'wsuser-02';
$password = '46k54a92f1';


$headers = '<wsa:Action>http://79.123.252.91/OzlukSecureWS/PersonelValidation</wsa:Action>'.
         ' <wsa:ReplyTo>'.
          '  <wsa:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address>'.
         ' </wsa:ReplyTo>'.
          '<wsa:To>http://79.123.252.91/OzlukSecureWS/PersonelValidation.asmx</wsa:To>'.
          '<wsse:Security soap:mustUnderstand="1">'.
            '<wsu:Timestamp wsu:Id="Timestamp-a3dbcfd4-461d-428e-8a8c-e3cb0b953f14">'.
              '<wsu:Created>2009-10-14T13:43:05Z</wsu:Created>'.
              '<wsu:Expires>2009-10-14T13:48:05Z</wsu:Expires>'.
            '</wsu:Timestamp>'.
            '<wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="SecurityToken-17f43399-0dc8-471a-987e-6c5f3d20a978">'.
              '<wsse:Username>'.$username.'</wsse:Username>'.
              '<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">'.sha1($password).'</wsse:Password>'.
              '<wsse:Nonce>ktSULGqUMmCbC6t4XGBGwQ==</wsse:Nonce>'.
              '<wsu:Created>2009-10-14T13:43:05Z</wsu:Created>'.
            '</wsse:UsernameToken>'.
          '</wsse:Security>';

		




$client = new nusoap_client('http://79.123.252.91/OzlukSecureWS/PersonelValidation.asmx?WSDL', 'wsdl',
                  $proxyhost, $proxyport, $proxyusername, $proxypassword);
$client->setHeaders($headers);  

$err = $client->getError();


if ($err) {
   echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
}
// Doc/lit parameters get wrapped
$param = array("identityNo"=>"42361169248"); // array('Symbol' => 'IBM');

$result = $client->call('isExist', array('parameters' => $param), 'http://79.123.252.91/OzlukSecureWS/PersonelValidation', '', false, true);
// Check for a fault
if ($client->fault) {
   echo '<h2>Fault</h2><pre>';
   print_r($result);
   echo '</pre>';
} else {
   // Check for errors
   $err = $client->getError();
   if ($err) {
      // Display the error
      echo '<h2>Error</h2><pre>' . $err . '</pre>';
   } else {
      // Display the result
      echo '<h2>Result</h2><pre>';
      print_r($result);
      echo '</pre>';
   }
}
echo '<h2>Request</h2><pre>' . htmlspecialchars($client->request, ENT_QUOTES) . '</pre>';
echo '<h2>Response</h2><pre>' . htmlspecialchars($client->response, ENT_QUOTES) . '</pre>';
echo '<h2>Debug</h2><pre>' . htmlspecialchars($client->debug_str, ENT_QUOTES) . '</pre>';

*/





/*
 *	$Id: wsdlclient1.php,v 1.3 2007/11/06 14:48:48 snichol Exp $
 *
 *	WSDL client sample.
 *
 *	Service: WSDL
 *	Payload: document/literal
 *	Transport: http
 *	Authentication: none
 */
require_once('lib/nusoap.php');
$proxyhost = isset($_POST['proxyhost']) ? $_POST['proxyhost'] : '';
$proxyport = isset($_POST['proxyport']) ? $_POST['proxyport'] : '';
$proxyusername = isset($_POST['proxyusername']) ? $_POST['proxyusername'] : '';
$proxypassword = isset($_POST['proxypassword']) ? $_POST['proxypassword'] : '';

$username = 'wsuser-02';
$password = '46k54a92f1';
$degisiklik = 22;
$headers ='<wsa:Action>http://79.123.252.91/OzlukSecureWS/PersonelValidation</wsa:Action>'.
          '<wsa:ReplyTo>'.
          '<wsa:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address>'.
          '</wsa:ReplyTo>'.
          '<wsa:To>http://79.123.252.91/OzlukSecureWS/PersonelValidation.asmx</wsa:To>'.
          '<wsse:Security soap:mustUnderstand="1">'.
          '<wsse:UsernameToken>'.
 		  '<wsse:Username>'.$username.'</wsse:Username>'.
          '<wsse:Password>'.$password.'</wsse:Password>'.
          '</wsse:UsernameToken>'.
          '</wsse:Security>';


$client = new nusoap_client('http://79.123.252.91/OzlukSecureWS/PersonelValidation.asmx?WSDL', 'wsdl',
						$proxyhost, $proxyport, $proxyusername, $proxypassword);

$client->setHeaders($headers); 						

$err = $client->getError();
if ($err) {
	echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
}
// Doc/lit parameters get wrapped
$param = array('identityNo' => '42361169248');
$result = $client->call('isExist', array('parameters' => $param), '', '', false, true);

// Check for a fault
if ($client->fault) {
	echo '<h2>Fault</h2><pre>';
	print_r($result);
	echo '</pre>';
} else {
	// Check for errors
	$err = $client->getError();
	if ($err) {
		// Display the error
		echo '<h2>Error</h2><pre>' . $err . '</pre>';
	} else {
		// Display the result
		echo '<h2>Result</h2><pre>';
		print_r($result);
		echo '</pre>';
	}
}
echo '<h2>Request</h2><pre>'  .  htmlspecialchars($client->request, ENT_QUOTES) . '</pre>';
echo '<h2>Response</h2><pre>' .  htmlspecialchars($client->response, ENT_QUOTES) . '</pre>';
echo '<h2>Debug</h2><pre>'    .  htmlspecialchars($client->debug_str, ENT_QUOTES) . '</pre>';



?>
